#include <iostream>
#include <stdio.h>
#include <string>

using namespace std;

int main() {
    string s;
    cin >> s;
    int n = 0;
    int a = 0;
    for(int i = 0; i < s.length(); i ++){
        if(s[i] >= '0' && s[i] <= '9'){
            n *= 10;
            n += s[i]-'0';
        }
        else{
            a += n;
            n = 0;
        }
        if(i == s.length()-1){
            a += n;
        }
    }
    cout << a;
    return 0;
}